<?php
include("food_conf.php");
?>
<?php
Session_Start();
$shop_ID = $_SESSION["shop_ID"];
$display = "select * from food where shop_id='$shop_ID'";
$result = mysql_query($display,$conn) or die ("用户数据加载失败: ".mysql_error());
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script language="javascript"> 
    function setValue(aa)
    {
		document.getElementById("a").value = document.getElementById("aa").innerHTML;
	}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编号<?php echo $_GET["shop_ID"];?></title>
  <style text="text/css">
  td{
  font-size:28px;
  background-color:grey;
  width:280px;
  height:25px}
  body,td,th {
	font-size: 18px;
	color: #FC3;
}
body {
	background-color: #FFF;
	background-image: url(image/%E5%BA%97%E5%AE%B6&%E5%AD%A6%E7%94%9F%E5%90%8E%E5%8F%B0.jpg);
	background-repeat: no-repeat;
}
  </style>
</head>
<body>
<div align="center">
  <table bgcolor="#999999">
<tr align="center">
<td>食物名</td>
<td>食物价格</td>
<td>食物状态</td>
</tr>
<?php
$shop_ID = $_GET["shop_ID"];
$display = "select * from food where shop_id='$shop_ID'";
$result = mysql_query($display,$conn) or die ("用户数据加载失败: ".mysql_error());

 echo "欢迎订餐，本店编号是".$shop_ID.".";
 
if ($num = mysql_num_rows($result))
{
	while($row = mysql_fetch_array($result,MYSQL_ASSOC))
	{
?>
<tr>
	<td align="center">
    <a href="javascript:setValue('<?php $row['food_name']?>');" id="aa">
	<?php echo $row['food_name'];?>
    </a>
    </td>
	<td align="center"><?php echo $row['food_value'];?></td>
    <td align="center"><?php
	if($row['food_state']==1){echo "可售";}
	else {echo "卖完";}
	?></td>
</tr>
<?php
	}
}
mysql_close($conn);
?>
</table>
</div>
<div style="position: absolute; width: 167px; left: 1200px; top: 359px; background-color: #FFFFFF; border: 1px none #000000; font-weight: bold; color: #000; height: 271px;">
   <textarea name="order_food" cols="21" rows="20" id="a"></textarea>
   
            </div>

</div>
</body>
</html>